<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style type="text/css">
        *{
            margin: 0px;
            padding: 0px;
            font-size: 10px;
        }
        #top{
            width: 100%;
            height: 60px;
            background-color: #d5fcff;
            min-width: 100%;
        }
        #top table{
            border:0px;
            width: 100%;

        }
        #top .td_01{
            width: 10%;
            background-image: url("img/tiger.jpg");
            background-size: 50px;
            background-repeat: no-repeat;
            background-position-y: center;
        }
        #top .td_02{
            width: 80%;

        }
        #top .td_03{
            text-align: right;
            height: 25px;
            line-height: 25px;
        }
        #top .td_04{
            text-align: center;
            height: 25px;
            line-height: 25px;
        }
        .txt{
            text-align: center;
            font-size: 36px;
            letter-spacing: 3px;
            line-height: 45px;
        }
    </style>
</head>
<body>
<div id="top">
    <table>
        <tr>
            <td rowspan="2" class="td_01">
            </td>
            <td rowspan="2" class="td_02 txt">
                东软个人理财系统
            </td>
            <td class="td_03">
                欢迎【<span>王老虎</span>】登录
            </td>
            <td class="td_04">
                <a href="">注销</a>
            </td>
        </tr>
        <tr>
            <td colspan="2" class="td_04">
                <span id="time">2020年08月31日 16:37:45</span>
            </td>
        </tr>
    </table>
</div>
</body>
<script>
    var time = document.getElementById("time");
    function timeShow() {
        var date = new Date();
        var year = date.getFullYear();        //年 ,从 Date 对象以四位数字返回年份
        var month = date.getMonth() + 1;      //月 ,从 Date 对象返回月份 (0 ~ 11) ,date.getMonth()比实际月份少 1 个月
        var day = date.getDate();             //日 ,从 Date 对象返回一个月中的某一天 (1 ~ 31)
        var hours = date.getHours();          //小时 ,返回 Date 对象的小时 (0 ~ 23)
        var minutes = date.getMinutes();      //分钟 ,返回 Date 对象的分钟 (0 ~ 59)
        var seconds = date.getSeconds();      //秒 ,返回 Date 对象的秒数 (0 ~ 59)
        //获取当前系统时间
        var currentDate = year + "-" + month + "-" + day + " " + hours + ":" + minutes + ":" + seconds;
        //修改月份格式
        if (month >= 1 && month <= 9) {
            month = "0" + month;
        }
        //修改日期格式
        if (day >= 0 && day <= 9) {
            day = "0" + day;
        }
        //修改小时格式
        if (hours >= 0 && hours <= 9) {
            hours = "0" + hours;
        }
        //修改分钟格式
        if (minutes >= 0 && minutes <= 9) {
            minutes = "0" + minutes;
        }
        //修改秒格式
        if (seconds >= 0 && seconds <= 9) {
            seconds = "0" + seconds;
        }
        //获取当前系统时间  格式(yyyy-mm-dd hh:mm:ss)
        var newDate = year + "年" + month + "月" + day + "日 " + hours + ":" + minutes + ":" + seconds;
        time.innerHTML = newDate;
    }
    timeShow();
    setInterval("timeShow()",1000);

</script>
</html>